<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page import="java.util.*" %>
<%request.setCharacterEncoding("utf-8"); %>
<!DOCTYPE>
<html>
<head>
	<link rel="stylesheet" href="sheet.css">
	<title>编辑试管信息</title>
</head>
<body>
    <section>
        <div class="box">
            <!-- 登录框 -->
            <div class="container">
                <div class="form">
					<form action="RestFulServlet?method=add_tube" method="post">
                        <div class="inputBox">
							<input type="text" name="tube_id" placeholder="TUBE_ID">
						</div>
						
                        <div class="inputBox">
							<input type="submit" value="添加">
						</div>
					</form>
					<form action="confirm.jsp" method="post">
                        <div class="inputBox">
							<input type="submit" value="添加学生">
						</div>
					</form>
					<form action="RestFulServlet?method=remove_student" method="post">
                        <div class="inputBox">
							<input type="text" name="sequence" placeholder="sequence">
						</div>
                        <div class="inputBox">
							<input type="submit" value="删除">
						</div>
					</form>
					<p>${error}</p>
					<table border=1>
	     				<thead>
	      				    <tr>
	             				<th>Sequence</th>
	              				<th>Id</th>
	               				<th>Name</th>
	         				 </tr>
	        			</thead>
					    <tbody>
               				<c:forEach var="student" varStatus="vs" items="${studentList}">
               					<tr>
	                   				<td><c:out value="${vs.count}" /></td>
	                    			<td><c:out value="${student.getCode()}" /></td>
	                    			<td><c:out value="${student.getName()}" /></td>
        						</tr>
        					</c:forEach>
	        			</tbody>
   					</table>
   		
   					<form action="RestFulServlet?method=submit_tube" method="post">
                        <div class="inputBox">
							<input type="submit" value="提交">
						</div>
					</form>
                </div>
            </div>
        </div>
    </section>
</body>
</html>